import { _decorator} from 'cc';
import { UIMgr, UIType } from '../../../../Framework/Scripts/Managers/UIMgr';
import { AbNames } from '../../Config/ResConfig';
import { ExitTip_Ctr } from '../ExitTip_Ctr';
import { UIComponent } from '../../../../Framework/Scripts/Managers/UIComponent';
const { ccclass, property } = _decorator;

@ccclass('GameZt')
export class GameZt extends UIComponent {
    start() {

    }

    update(deltaTime: number) {
        
    }

    private backHome(){
        //发送请求退出房间
        globalThis.gameMgr._GameZtMsg.sendUserExit();
    }

    //返回
    public OnBtnCloseClick1(){
        let com = UIMgr.inst.ShowUIView(AbNames.GamePlay,'Prefabs/ExitTip',UIType.UnFull) as ExitTip_Ctr;
        com.setData(()=>{
            console.log('=======leftClick========')
            this.backHome();
        },()=>{
            console.log('=======rightClick========')
           
        },'您确定要退出游戏吗？')
    }
}


